package com.example.demo.service.impl;

import com.example.demo.entity.Employee;
import com.example.demo.entity.dto.QueryEmployeeVo;
import com.example.demo.mapper.EmployeeMapper;
import com.example.demo.service.EmployeeService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired
    EmployeeMapper empMapper;
    @Override
    public Employee login(String username, String password) {


        return empMapper.selectByNameAndPassword(username,password);
    }

    @Override
    public Employee findEmpByName(String username) {
        return null;
    }

    @Override
    public boolean registerAdmin(Employee employee) {
        return false;
    }

    @Override
    public PageInfo<Employee> queryByPageAndCondition(QueryEmployeeVo queryEmployeeVo) {
        return null;
    }

    @Override
    public boolean updateEmployee(Employee employee) {
        return false;
    }

    //getEmpNo  根据id查询
    @Override
    public Employee findEmpById(String userId) {

        return empMapper.selectByEmpNo(userId);
    }

    @Override
    public boolean addEmployee(Employee employee) {
        return false;
    }

    @Override
    public boolean editEmployee(Employee employee) {
        return false;
    }

    @Override
    public boolean removeEmployees(String... ids) {
        return false;
    }

    @Override
    public List<Employee> queryAll() {
        return null;
    }

    @Override
    public boolean insertBatch(List<Employee> employees) {
        return false;
    }

    @Override
    public boolean updateStatus(String id, String status) {
        return false;
    }
}
